package com.sourcetrip.linkedlist;


import com.sourcetrip.raw.adt.MyDoublyLinkedList;

/**
 * @author: ZhouBert
 * @date: 2020/11/18
 * @description:
 */
public class MyDoublyLinkedListTest01 {

	public static void main(String[] args) {
		MyDoublyLinkedList<Integer> list = new MyDoublyLinkedList<>();
		list.add(1);
		list.add(2);
		list.add(3);

		Integer integer = list.get(2);
		System.out.println("integer = " + integer);

		list.add(2,4);

		System.out.println("list = " + list);
		list.add(list.size(),5);
		System.out.println("after add(size) list = " + list);

		list.remove(0);
		System.out.println("after remove(0) list = " + list);

		list.remove(list.size()-1);
		System.out.println("after remove(size-1) list = " + list);
	}
}
